package me.tuyou.classloader;

public class SystemClassLoaderDemo {

    public static void main(String[] args) {

        //AppClassLoader
        System.out.println(SystemClassLoaderDemo.class.getClassLoader());

        //ExtClassLoader
        System.out.println(SystemClassLoaderDemo.class.getClassLoader().getParent());

        //null=BootstrapClassLoader
        System.out.println(SystemClassLoaderDemo.class.getClassLoader().getParent().getParent());

        //null=BootstrapClassLoader
        System.out.println(String.class.getClassLoader());
    }
}